import type { IClass } from "@lib/types";
import { Modal } from "bootstrap";
import type { JSXElement, Ref } from "solid-js";
import type { JSX } from "solid-js/jsx-runtime";

export interface SolidModalProps extends JSX.CustomAttributes<HTMLDivElement> {
    fade?: boolean
    onHide?: () => void
    onHidden?: () => void
    onHidePrevented?: () => void
    onShow?: () => void
    onShown?: () => void
    onRef?: (instance?: Modal) => void
    // options
    options?: {
        backdrop?: boolean | 'static',
        focus?: boolean
        keyboard?: boolean
    }
    // size
    size?: 'sm' | 'lg' | 'xl'
    scrollable?: boolean
    centered?: boolean
    fullscreen?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
}

export interface SolidModalDialogProps extends JSX.CustomAttributes<HTMLDivElement> {
    scrollable?: boolean
    centered?: boolean
    fullscreen?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
}

export interface SolidModalContentProps extends JSX.CustomAttributes<HTMLDivElement> {

}

export interface SolidModalTitleProps<T = 'h1'> extends IClass, JSX.CustomAttributes<T>, JSX.HTMLAttributes<T> {
    as?: T
}

export interface SolidModalHeaderProps extends JSX.CustomAttributes<HTMLDivElement> {

}

export interface SolidModalBodyProps extends JSX.CustomAttributes<HTMLDivElement> {

}

export interface SolidModalFooterProps extends JSX.CustomAttributes<HTMLDivElement> {

}

export interface SolidModalCloseButtonProps extends JSX.CustomAttributes<HTMLButtonElement>, JSX.HTMLAttributes<HTMLButtonElement> {

}
